<template>
  <div>
    <v-header>

    </v-header>
    <div class="top_img">
        <img src="../static/images/index_bdg.jpg"/>
    </div>
   <div class="main">
        <div class="partner_title">
            <ul>
                <li @click="firstClick" v-bind:class="{par_btn: isActive2}" style="width:50%">一阶合作伙伴</li>
                <li @click="secondClick" v-bind:class="{par_btn: isActive3}" style="width:50%">二阶合作伙伴</li>
            </ul>
        </div>
        <div v-show="isActive2" class="partner_min" >
            <div  v-for="item in second" class="par_min_row border_bot">
                <div class="par_row_lf">
                    <span>
                        <img src="../static/images/partner.png" />
                    </span>
                    <p>{{item.roleName}}：{{item.phone}}</p>
                </div>
                <div class="par_row_lg">

                    <p>{{item.create_time}}</p>
                    <p>注册时间</p>
                </div>
            </div>
        </div>
         <div v-show="isActive3" class="partner_min" >
            <div  v-for="item in first" class="par_min_row border_bot">
                <div class="par_row_lf">
                    <span>
                        <img src="../static/images/partner.png" />
                    </span>
                    <p>{{item.roleName}}：{{item.phone}}</p>
                </div>
                <div class="par_row_lg">

                    <p>{{item.create_time}}</p>
                    <p>注册时间</p>
                </div>
            </div>
        </div>
    </div>
    <!--脚部-->
    <v-footer></v-footer>

  </div>
</template>

<script>
export default {
  created () {
    this.$api.get('/front/children', null, r => {
      console.log('合作伙伴r', r)
      this.first = r.first.list
      this.second = r.second.list
    })
  },
  data () {
    return {
      isActive2: true,
      isActive3: false,

      src: this.$src,
      first: [],
      second: []
    }
  },
  methods: {
    firstClick: function () {
      this.isActive2 = true
      this.isActive3 = false
    },
    secondClick: function () {
      this.isActive3 = true
      this.isActive2 = false
    }
  }
}
</script>


